package com.zwr.sheller.shop.service;

import com.zwr.sheller.core.common.LJCBusinessException;

import java.util.List;
import java.util.Map;

/**
 * @author ljc
 * @date 2022/1/7
 **/
public interface GoodsService {

    /**
     * 获取商品分类(添加商品时)
     * @return
     */
    Map getGoodsClassification();

    /**
     * 获取商品所有分类
     * @return
     */
    Map getGoodsAllClassification();

    /**
     * 添加商品基本信息
     * @param map
     * @return
     * @throws LJCBusinessException
     */
    Map addGoodsInfo(Map<String, Object> map) throws LJCBusinessException;

    /**
     * 搜索商品(带分页)
     * @param itemId
     * @param goodsNameOrKeyWord
     * @param rank
     * @param goodsLabel
     * @param page
     * @param size
     * @return
     */
    Map selectGoodsWithPage(Long itemId, String goodsNameOrKeyWord, Integer rank, String goodsLabel, Integer page, Integer size);

    /**
     * 搜索商品(不带分页)
     * @param itemId
     * @param goodsNameOrKeyWord
     * @param rank
     * @param goodsLabel
     * @return
     */
    List<Map<String, Object>> selectGoodsNoPage(Long itemId, String goodsNameOrKeyWord, Integer rank, String goodsLabel);

    /**
     * 获取上级分类
     * @return
     */
    Map getParentClassification();

    /**
     * 添加商品分类
     * @param sort
     * @param parentClassification
     * @param name
     * @param keyWord
     * @param imgPath
     * @param isRelevance
     * @param isDisplay
     * @param isRecommend
     * @param desc
     * @return
     * @throws LJCBusinessException
     */
    Map addClassification(Long sort, String parentClassification, String name, String keyWord, String imgPath, Boolean isRelevance, Boolean isDisplay, Boolean isRecommend, String desc) throws LJCBusinessException;


    /**
     * 删除商品分类
     * @param classificationId
     * @return
     * @throws LJCBusinessException
     */
    Map deleteGoodsClassification(Long classificationId) throws LJCBusinessException;

    /**
     * 添加标签组
     * @param map
     * @return
     * @throws LJCBusinessException
     */
    Map addLabelGroup(Map<String, Object> map) throws LJCBusinessException;

    /**
     * 查询标签组
     * @return
     */
    Map findLabelGroup();

    /**
     * 删除商品
     * @param map
     * @return
     * @throws LJCBusinessException
     */
    Map deleteGoods(Map<String, Object> map) throws LJCBusinessException;

    /**
     * 下架商品
     * @param map
     * @return
     */
    Map downShelfGoods(Map<String, Object> map);

    /**
     * 上架商品
     * @param map
     * @return
     */
    Map upShelfGoods(Map<String, Object> map);

    /**
     * 获取商品3级分类(修改分类时)
     * @return
     */
    Map getThirdClassification();

    /**
     * 修改商品分类
     * @param map
     * @return
     */
    Map updateGoodsClassification(Map<String, Object> map);

    /**
     * 修改商品标签
     * @param map
     * @return
     */
    Map updateGoodsLabel(Map<String, Object> map);

    /**
     * 彻底删除商品
     * @param map
     * @return
     */
    Map realDeleteGoods(Map<String, Object> map);

    /**
     * 还原商品
     * @param map
     * @return
     */
    Map recoverGoods(Map<String, Object> map);

    /**
     * 获取商品基本信息
     * @param goodsId
     * @return
     */
    Map getGoodsInfo(String goodsId);

    /**
     * 编辑商品基本信息
     * @param map
     * @return
     * @throws LJCBusinessException
     */
    Map editGoodsBasicInfo(Map<String, Object> map) throws LJCBusinessException;

    /**
     * 编辑商品库存
     * @param map
     * @return
     */
    Map editGoodsStock(Map<String, Object> map);

    /**
     * 编辑商品规格
     * @param map
     * @return
     */
    Map editGoodsSpecification(Map<String, Object> map);

    /**
     * 编辑商品参数
     * @param map
     * @return
     */
    Map editGoodsParameters(Map<String, Object> map);

    /**
     * 编辑商品详情
     * @param map
     * @return
     * @throws LJCBusinessException
     */
    Map editGoodsDetail(Map<String, Object> map) throws LJCBusinessException;

    /**
     * 编辑商品营销
     * @param map
     * @return
     */
    Map editGoodsMarketing(Map<String, Object> map);

    /**
     * 编辑商品掌柜推荐
     * @param map
     * @return
     */
    Map editGoodsRecommend(Map<String, Object> map);

    /**
     * 搜索分类
     * @param nameOrKeyword
     * @return
     */
    Map selectClassification(String nameOrKeyword);

    /**
     * 获取分类信息(编辑分类时)
     * @param itemId
     * @return
     */
    Map getClassificationInfo(Long itemId);

    /**
     * 编辑分类信息
     * @param map
     * @return
     * @throws LJCBusinessException
     */
    Map editClassificationInfo(Map<String, Object> map) throws LJCBusinessException;

    /**
     * 搜索标签组
     * @param name
     * @return
     */
    Map selectLabelGroup(String name);

    /**
     * 启用或禁用标签组
     * @param map
     * @param way
     * @return
     */
    Map activateOrDisabledLabelGroup(Map<String, Object> map, Boolean way);

    /**
     * 删除标签组
     * @param map
     * @return
     */
    Map deleteLabelGroup(Map<String, Object> map);

    /**
     * 编辑标签组
     * @param map
     * @return
     */
    Map editLabelGroup(Map<String, Object> map);

    /**
     * 添加商品组
     * @param map
     * @return
     * @throws LJCBusinessException
     */
    Map addGoodsGroup(Map<String, Object> map) throws LJCBusinessException;

    /**
     * 搜索商品组
     * @param goodsGroupName
     * @return
     */
    Map selectGoodsGroup(String goodsGroupName);

    /**
     * 启用或禁用商品组
     * @param map
     * @param way
     * @return
     */
    Map activateOrDisabledGoodsGroup(Map<String, Object> map, Boolean way);

    /**
     * 编辑商品组
     * @param map
     * @return
     */
    Map editGoodsGroup(Map<String, Object> map);

    /**
     * 删除商品组
     * @param map
     * @return
     */
    Map deleteGoodsGroup(Map<String, Object> map);

}
